package com.tuanzi.loan.web.lazy.product.model;

import com.tuanzi.loan.business.service.family.ActivityModelService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.ActivityModelSearchRequest;
import com.tuanzi.loan.vo.response.family.ActivityModelSearchResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

/**
 * @Auther: hequnayu
 * @Date: 2019/7/8 15:23
 * @Description:
 */
public class LoanActivityModelLazyDataModel extends LazyDataSessionModel<ActivityModelSearchRequest, ActivityModelSearchResponse> {

    private static final long serialVersionUID = -7602478824319652184L;

    ActivityModelService modelService;

    public LoanActivityModelLazyDataModel(ActivityModelSearchRequest activityModelSearchRequest, CurrentUserBean session, ActivityModelService modelService) {
        super(activityModelSearchRequest, session);
        this.modelService = modelService;
    }

    @Override
    protected Page<ActivityModelSearchResponse> doLoad0(PageSearcher<ActivityModelSearchRequest> pageSearcher) {
        return modelService.list(pageSearcher);
    }
}
